package com.fourth.shopping.service.impl;

import com.fourth.shopping.entity.Administrator;
import com.fourth.shopping.entity.Role;
import com.fourth.shopping.mapper.AdministratorMapper;
import com.fourth.shopping.mapper.RoleMapper;
import com.fourth.shopping.service.LoginService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class LoginServiceImpl implements LoginService {

    @Resource
    AdministratorMapper adminmapper;

    @Resource
    RoleMapper roleMapper;

    @Override
    public Administrator Login(String username, String password) {

        return adminmapper.login(username, password);
    }

    @Override
    public List<Role> getRole(String username) {
        return roleMapper.getRole(username);
    }
}
